from BrushBook import BrushBook


regex = '<p class="line"><a href="#">\[.*?\]</a><a href="(.*?)" class="blue">(.*?)</a>/<a href="/author/.*?" style="color:red">(.*?)</a>/月点击.*?</p>'
#regex = '<p class="line"><a href="#">[玄幻]</a><a href="/xs/19/19436/" class="blue">八荒斗神</a>/<a href="/author/庞飞烟" style="color:red">庞飞烟</a>/月点击2</p>'
site_name = 'm.92zw.la'
拼接 = 'http://m.92zw.la'
for i in range(1,5835):#5835
    with open('{}进行到最后的id值.txt'.format(site_name),'w') as ff:
        ff.write(str(i))
        
    url = 'http://m.92zw.la/top-allvisit-{}/'.format(i)
    print(url)

    bb = BrushBook(url,regex,site_name,拼接)

    bb.save_info_csv()

    

